package com.example.provider.controller;

import com.example.provider.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private IUserService userService;

    @RequestMapping("/findById")
    public String findById() {
        System.out.println("provider controller.....");
        userService.findById();

        return "调到我了";
    }

    public static boolean canVisitable = true;
    @RequestMapping("/changeHealth/{can}")  //can是canVisitable
    public void changeHealth(@PathVariable boolean can){
        canVisitable = can;
    }
}